package com.shop.cereshop.app.dao.notice;

import com.shop.cereshop.app.page.notice.BuyerNotice;
import com.shop.cereshop.app.page.notice.NoticeDetail;
import com.shop.cereshop.commons.domain.notice.CereNotice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CereNoticeDAO {
    int deleteByPrimaryKey(Long noticeId);

    int insert(CereNotice record);

    int insertSelective(CereNotice record);

    CereNotice selectByPrimaryKey(Long noticeId);

    int updateByPrimaryKeySelective(CereNotice record);

    int updateByPrimaryKey(CereNotice record);

    List<BuyerNotice> getAll(@Param("buyerUserId") Long buyerUserId);

    NoticeDetail getById(@Param("noticeId") Long noticeId);

    List<BuyerNotice> getGongGaoAll(@Param("buyerUserId") Long buyerUserId);

    void insertBatch(@Param("list") List<CereNotice> list);

    void updateBuyerData(@Param("buyerUserId") Long buyerUserId, @Param("id") Long id);

    int getNotRead(@Param("buyerUserId") Long buyerUserId);

    int getRead(@Param("buyerUserId") Long buyerUserId);

    List<Long> findIdsByOrderId(@Param("orderId") Long orderId);

    void deleteByIds(@Param("ids") List<Long> ids);

    void deleteBuyerNotice(@Param("ids") List<Long> ids, @Param("buyerUserId") Long buyerUserId);
}